/**
 * @copyright   2010-2017, The Titon Project
 * @license     http://opensource.org/licenses/BSD-3-Clause
 * @link        http://titon.io
 */

/**
 * Generate a specific state for the custom checkbox toggle.
 *
 * @param string $pseudo
 */
@mixin checkbox-state($pseudo) {
    #{generate-class-name($titon-checkbox)} {
        input:#{$pseudo} + #{generate-class-name($titon-checkbox, "toggle")} {
            @content;
        }
    }
}

/**
 * Generate a specific state for the custom radio toggle.
 *
 * @param string $pseudo
 */
@mixin radio-state($pseudo) {
    #{generate-class-name($titon-radio)} {
        input:#{$pseudo} + #{generate-class-name($titon-radio, "toggle")} {
            @content;
        }
    }
}

/**
 * Generate show/hide display classes for a specific class.
 *
 * @param string $class
 */
@mixin responsive-display($class) {
    #{$class} { display: block !important; }
    table#{$class} { display: table !important; }
    tr#{$class} { display: table-row !important; }
    td#{$class},
    th#{$class} { display: table-cell !important; }
    li#{$class} { display: list-item !important; }
}

/**
 * Generate a specific state for the custom select toggle.
 *
 * @param string $pseudo
 */
@mixin select-state($pseudo) {
    #{generate-class-name($titon-select)} {
        select:#{$pseudo} + #{generate-class-name($titon-select, "toggle")} {
            @content;
        }
    }
}

/**
 * Generate a specific state for the switch toggle.
 *
 * @param string $pseudo
 */
@mixin switch-state($pseudo) {
    #{generate-class-name($titon-switch)} {
        input:#{$pseudo} + #{generate-class-name($titon-switch, "bar")} {
            @content;
        }
    }
}

